<extend name="Public:base" />
<block name="main">
	<div class="content">
		<section class="location">
			<i class="iconfont">&#xe60f</i> 位置：<a href="{:U('Index/main')}">管理首页</a> &gt; 数据库管理
		</section>
		<ul class="nav-tabs clearfix">
			<li class="active">数据库管理</li>
		</ul>
		<form method="post" name="list">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table table-hover">
				<thead>
					<tr>
						<th width="30px">ID</th>
						<th>文件名</th>
						<th width="150px">备份时间</th>
						<th width="130px">文件大小</th>
						<th width="150px">操作</th>
					</tr>
				</thead>
				<tbody>
					<notempty  name="lists">
						<foreach name="lists" key="key" item="row">
							<if condition="$key gt 1">
								<tr>
									<td>{$key-1}</td>
									<td><a href="{:U('Bak/index',array('Action'=>'download','file'=>$row))}">{$row}</a></td>
									<td>{$row|getfiletime=$datadir}</td>
									<td>{$row|getfilesize=$datadir}</td>
									<td>
										<a href="{:U('Bak/index',array('Action'=>'download','file'=>$row))}">下载</a>
										<a onclick="return confirm('确定将数据库还原到当前备份吗？')" href="{:U('Bak/index',array('Action'=>'RL','file'=>$row))}">还原</a>
										<a onclick="return confirm('确定删除该备份文件吗？')" href="{:U('Bak/index',array('Action'=>'Del','file'=>$row))}">删除</a>
									</td>
								</tr>
							</if>
						</foreach>
					<else/>
						<tr>
							<td colspan="7">没有找到相关数据。</td>
						</tr>
					</notempty>
				</tbody>
			</table>
			<a href="{:U('index',array('Action' => 'backup'))}" class="btn btn-theme">备份添加</a>
		</form>
	</div>
</block>